a=int(input("Enter a Number:")) b=int(input("Enter a Number:")) z = a if a>b else b print("Greatest Number is",z)
Enter a Number: 22 Enter a Number: 28 Greatest Number is 28
a=int(input("a=")) b=int(input("b=")) c=int(input("c=")) d=int(input("d=")) x=a if a>b else b y=c if c>d else d z=x if x>y else y print("Greatest Number is ",z)
a= 50 b= 30 c= 20 d= 70 Greatest Number is 70
HRA | BASIC | TA | BASIC | ITax | BASIC |
---|---|---|---|---|---|
5000 | >=10000 | 2000 | >=15000 | 2500 | >=20000 |
3000 | ⁢10000 | 1000 | ⁢15000 | 0 | ⁢20000 |
basic=int(input("Enter Basic Salary ")) hra = 5000 if basic>=10000 else 3000 ta = 2000 if basic>=15000 else 1000 itax = 2500 if basic>=20000 else 0 netsal = basic+hra+ta-itax print("Net Salary ",netsal)
Enter Basic Salary 17000 Net Salary is 24000